<%@ Page Language="C#" MasterPageFile="~/Masterpages/MasterPage.master" CodeFile="Register.aspx.cs"
    Inherits="Register_aspx" Title="Register" meta:resourcekey="PageResource1" %>
     

<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" Runat="server">
            
        <div class="section medium">
            
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText="Please correct the following errors:" CssClass="messageBox error" meta:resourcekey="ValidationSummary1Resource1" ValidationGroup="RegisterGroup" />

            <div class="messageBox">
                <asp:Label ID="InfoLabel" runat="server" Visible="False" meta:resourcekey="InfoLabelResource1" />
                <asp:Literal ID="lblWhyAdvancedRegister" runat="server" Text="Fill out the following form to register with us!" meta:resourcekey="lblWhyAdvancedRegisterResource"></asp:Literal>
                <asp:Label ID="lblMessage" runat="server" Visible="False" meta:resourcekey="lblRegistrationErrorResource1"></asp:Label>                        
            </div>
                      
            
            <fieldset>
                <legend><asp:Label ID="lblLegendRegisterWithTwitter" runat="server" Text="Register with Twitter" meta:resourcekey="lblLegendRegisterWithTwitterResource1"></asp:Label></legend>
                <ol>
                    <li class="buttonBar">
                        <asp:Button ID="Button1" runat="server" Text="Submit" 
                            OnClick="btnSubmitTwitterLogin_Click" meta:resourcekey="btnSubmitTwitterLoginResource1" CausesValidation="false" />
                    </li>  
                </ol>
            </fieldset>

            <fieldset>
            <legend class="mandatory"><asp:Label ID="lblLegend" runat="server" Text="Register" meta:resourcekey="lblLegendResource1"></asp:Label></legend>
            <ol>                
                <li>
                    <asp:Label ID="lblEmail" runat="server" meta:resourcekey="LabelEmail" Text="Email (is username) <abbr title='required field'>*</abbr>" AssociatedControlID="Email"></asp:Label>
                    <asp:TextBox ID="Email" runat="server" meta:resourcekey="EmailResource1"/>
                    <asp:RequiredFieldValidator ID="RequiredEmailValidator" runat="server" ErrorMessage="Email is mandatory" Text="Email is mandatory" ControlToValidate="Email" Display="None" SetFocusOnError="true" meta:resourcekey="RequiredEmailValidatorResource1"></asp:RequiredFieldValidator>    
                    <asp:RegularExpressionValidator ID="regexEmailValid" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="Email" SetFocusOnError="true" ErrorMessage="Invalid Email Format" meta:resourcekey="regexEmailValidatorResource1"></asp:RegularExpressionValidator>
                </li>
                <li>
                    <asp:Label ID="lblPassword" runat="server" meta:resourcekey="LabelPassword" ErrorMessage="Password <abbr title='required field'>*</abbr>" AssociatedControlID="Password"></asp:Label>
                    <asp:TextBox ID="Password" runat="server" TextMode="Password" meta:resourcekey="PasswordResource1"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredPasswordValidator" runat="server" ErrorMessage="Password is mandatory" ControlToValidate="Password" Display="None" SetFocusOnError="true" meta:resourcekey="RequiredPasswordValidatorResource1"></asp:RequiredFieldValidator>                    
                </li>
                <li><asp:Label ID="lblPassword2" runat="server" Text="Repeat password <span>*</span>" meta:resourcekey="lblPassword2Resource1" AssociatedControlID="Password2"></asp:Label>
                    <asp:TextBox ID="Password2" runat="server" TextMode="Password" meta:resourcekey="Password2Resource2"></asp:TextBox>
                    <asp:CompareValidator ID="CompareValidator1" 
                          runat="server" 
                          ErrorMessage="Passwords do not match" 
                          ControlToCompare="Password2" 
                          ControlToValidate="Password" 
                          EnableClientScript="False" Display="None" SetFocusOnError="true" 
                          meta:resourcekey="CompareValidator1Resource1"></asp:CompareValidator>
                </li>
                <li>
                    <asp:Label ID="lblPostalCode" runat="server" Text="Postcode (1122 AB) <abbr title='required field'>*</abbr>" meta:resourcekey="lblPostalCodeResource1" AssociatedControlID="PostalCode"></asp:Label>
                    <asp:TextBox ID="PostalCode" runat="server" CssClass="txtBox medium mandatory" MaxLength="4" meta:resourcekey="PostalCodeResource2"></asp:TextBox>
                    <asp:TextBox ID="PostalCodeExtension" runat="server" CssClass="txtBox small mandatory" MaxLength="2" meta:resourcekey="PostalCodeExtensionResource1"></asp:TextBox>                     
                    &#160;<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        ErrorMessage="PostalCode is mandatory" 
                        ControlToValidate="PostalCode" SetFocusOnError="true" 
                        Display="None" meta:resourcekey="RequiredFieldValidator4Resource1"></asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ErrorMessage="Zipcode extension is mandatory" 
                        ControlToValidate="PostalCodeExtension" SetFocusOnError="true" 
                        Display="None" meta:resourcekey="RequiredFieldValidator5Resource1"></asp:RequiredFieldValidator>
                </li>
                                                            
                </ol>
           
                <ol>
                    <li>
                        <asp:Label ID="lblNickname" runat="server" meta:resourcekey="LabelNickName" Text="Nickname" AssociatedControlID="Nickname" />
                        <asp:TextBox ID="Nickname" runat="server" CssClass="txtBox" meta:resourcekey="NicknameResource1" />                    
                    </li>
                    <li>
                        <asp:Label ID="lblPhone" runat="server" Text="Phone" meta:resourcekey="lblPhoneResource1" AssociatedControlID="PhoneNumberPrefix"></asp:Label>
                        <asp:TextBox ID="PhoneNumberPrefix" runat="server" CssClass="txtBox small" meta:resourcekey="PhoneNumberPrefixResource1"></asp:TextBox>
                        <asp:TextBox ID="PhoneNumber" runat="server" CssClass="txtBox medium" meta:resourcekey="PhoneNumberResource1"></asp:TextBox>&#160;(06 12345678) 
                    </li>      
                    <li class="buttonBar">
                        <asp:Button ID="btnSubmit" runat="server" Text="Submit" 
                            OnClick="btnSubmit_CreateUser" meta:resourcekey="btnSubmitResource1" />
                    </li>    
                </ol>
            </fieldset>
            </div>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="RightContent" Runat="server">
<div class="section small">
    <h3><asp:Label ID="lblHelp" runat="server" meta:resourcekey="lblHelpResource1" Text="Help"  /></h3>
    <ol>
        <li><asp:Label ID="lblTip1" runat="server" meta:resourcekey="lblTip1Resource1" Text="Use your email address, it will also be your username"  /></li>
        <li><asp:Label ID="lblTip2" runat="server" meta:resourcekey="lblTip2Resource1" Text="Your password must be at least 6 characters."  /></li>
        <li><asp:Label ID="lblTip3" runat="server" meta:resourcekey="lblTip3Resource1" Text="We need your zipcode, in order to show you the best deals in your area."  /></li>
        <li><asp:Label ID="lblTip4" runat="server" meta:resourcekey="lblTip4Resource1" Text="A phone number comes in handy, when people want to buy something from you."  /></li>
    </ol>                
</div>
</asp:Content>        
